package com.xiaomaoguai.spring.aop.jdk;

/**
 *
 * @ ClassName: Math.java
 * @ Author: WeiHui-Z
 * @ Date: 2017/1/10 19:06
 * @ Version: v1.0.0
 */
public class Math implements IMath {

	//加
	public int add(int n1, int n2) {
		int result = n1 + n2;
		System.out.println(n1 + "+" + n2 + "=" + result);
		return result;
	}

	//减
	public int sub(int n1, int n2) {
		int result = n1 - n2;
		System.out.println(n1 + "-" + n2 + "=" + result);
		return result;
	}

	//乘
	public int mut(int n1, int n2) {
		int result = n1 * n2;
		System.out.println(n1 + "X" + n2 + "=" + result);
		return result;
	}

	//除
	public int div(int n1, int n2) {
		int result = n1 / n2;
		System.out.println(n1 + "/" + n2 + "=" + result);
		return result;
	}
}
